package com.dbappsecurity.bifrost.di.component;

import android.view.View;
import com.dbappsecurity.bifrost.base.InjectBaseFragment;
import com.dbappsecurity.bifrost.contract.BaseContract;
import com.dbappsecurity.bifrost.di.module.FragmentModule;
import com.dbappsecurity.bifrost.di.scope.FragmentScope;
import dagger.BindsInstance;
import dagger.Component;

@FragmentScope
@Component(dependencies = AppComponent.class, modules = { FragmentModule.class })
public interface FragmentComponent {

  void inject(InjectBaseFragment fragment);

  @Component.Builder
  interface Builder {
    @BindsInstance
    Builder setContractView(BaseContract.View view);

    @BindsInstance
    Builder setRootView(View view);

    Builder app(AppComponent appComponent);

    Builder base(FragmentModule fragmentModule);

    FragmentComponent build();
  }
}
